﻿
Imports System.Collections.Generic
Imports System.ServiceModel
Imports ATS.Business.Entities
Imports System.Runtime.Serialization
Imports System.Collections.ObjectModel

Imports System.ComponentModel
Imports System.ComponentModel.DataAnnotations
Imports System.ServiceModel.DomainServices.EntityFramework
Imports System.ServiceModel.DomainServices.Hosting
Imports System.ServiceModel.DomainServices.Server

' NOTE: You can use the "Rename" command on the context menu to change the interface name "IService1" in both code and config file together.
<ServiceContract()>
Public Interface IAssetService



#Region "Asset"

    <OperationContract()> _
    Function ListActiveAssets() As MainAssetsTable

    <OperationContract()> _
    Function CreateAsset(_AssetDetails As MainAssetsTable) As MainAssetsTable

    <OperationContract()> _
    Function GetAssetDetails(_searchAsset As String) As MainAssetsTable

    <OperationContract()> _
    Function GetAllAssets() As List(Of MainAssetsTable)

    <OperationContract()> _
    Function UpdateAssetDetails(_AssetDetails As MainAssetsTable) As MainAssetsTable

    <OperationContract()> _
    Sub DeleteAsset(_AssetDetails As MainAssetsTable)
#End Region

#Region "User"
    <OperationContract()> _
    Function AuthenticateUser(ByVal username As String, ByVal password As String) As AuthenticationResult

    <OperationContract()> _
    Function VerifyHash(ByVal encryptedPassword As String, ByVal hash As String, ByVal salt As String) As Boolean

    <OperationContract()> _
    Function GetUserDetails(ByVal username As String) As UserTable

    <OperationContract()> _
    Function UpdatePassword(ByVal userDetails As UserTable) As UserTable

    <OperationContract()> _
    Function GetAllUsers() As List(Of UserTable)

    <OperationContract()> _
    Function CreateNewUser(ByVal userDetails As UserTable) As UserTable

    <OperationContract()> _
    Function UpdateUser(ByVal userDetails As UserTable) As UserTable

    <OperationContract()> _
    Function IObservableListGetAllUsers() As IObserveUserTable

    <OperationContract()> _
    Sub DeleteUser(ByVal userDetails As UserTable)

    <OperationContract()> _
    Function UserExists(ByVal uername As String) As Boolean
#End Region

#Region "Account Policy"
    <OperationContract()> _
    Function AccountPolicyValues() As admPasswordConfig

    <OperationContract()> _
    Function UpdateAccountPolicy(admPasswordConfigValues As admPasswordConfig) As admPasswordConfig
#End Region

#Region "Company Detail"
    <OperationContract()> _
    Function CreateNewCompanyDetail(ByVal companyDetails As CompanyDetail) As CompanyDetail

    <OperationContract()> _
    Function ReadCompanyDetail() As CompanyDetail

    <OperationContract()> _
    Function UpdateCompanyDetail(ByVal companyDetails As CompanyDetail) As CompanyDetail

#End Region

#Region "RFIDScanHistory"
    <OperationContract()> _
    Sub CreateRFIDScanHistory(_RFIDScanHistory As RFIDScanHistory, Optional _CreateASsetData As Boolean = False, Optional _CreatedBy As String = Nothing)

    <OperationContract()> _
    Function ReadRFIDScanHistoryByRFIDNumber(_RFIDNumber As String, Optional _RFIDScanDate As DateTime = Nothing) As List(Of RFIDScanHistory)

    <OperationContract()> _
    Function ReadRFIDScanHistoryByScanDate(_scanDateFrom As Date, _scanDateTo As Date) As List(Of RFIDScanHistory)

#End Region

#Region "Category"
    <OperationContract()> _
    Function CreateCategory(_category As Category) As Category

    <OperationContract()> _
    Function ReadCategory(_category As String) As Category

    <OperationContract()> _
    Function ReadAllCategories() As List(Of Category)

    <OperationContract()> _
    Function GetAllCategoryClass() As List(Of String)

    <OperationContract()> _
    Function UpdateCategoryRecord(_category As Category) As Category

    <OperationContract()> _
    Sub DeleteCategory(_category As Category)

#End Region

#Region "Location"
    <OperationContract()> _
    Function CreateLocation(_location As Location) As Location

    <OperationContract()> _
    Function ReadLocation(_location As String) As Location

    <OperationContract()> _
    Function ReadAllLocations() As List(Of Location)

    <OperationContract()> _
    Function UpdateLocationRecord(_location As Location) As Location

    <OperationContract()> _
    Sub DeleteLocation(_location As Location)

#End Region


#Region "Person"
    <OperationContract()> _
    Function CreatePerson(_personDetails As Person) As Person

    <OperationContract()> _
    Function GetPersonDetails(_searchPerson As String) As Person

    <OperationContract()> _
    Function GetAllPersons() As List(Of Person)

    <OperationContract()> _
    Function UpdatePersonDetails(_personDetails As Person) As Person

    <OperationContract()> _
    Sub DeletePerson(_personDetails As Person)

#End Region

#Region "Department"
    <OperationContract()> _
    Function CreateDepartment(_DepartmentDetails As Department) As Department

    <OperationContract()> _
    Function GetDepartmentDetails(_searchDepartment As String) As Department

    <OperationContract()> _
    Function GetAllDepartments() As List(Of Department)

    <OperationContract()> _
    Function GetDepartmentList() As List(Of String)

    <OperationContract()> _
    Function UpdateDepartmentDetails(_DepartmentDetails As Department) As Department

    <OperationContract()> _
    Sub DeleteDepartment(_DepartmentDetails As Department)

#End Region

#Region "Depreciation"
    <OperationContract()> _
    Function DepreciationList() As List(Of DepreciationClass)
#End Region

#Region "Disposed Asset"
    <OperationContract()> _
    Function GetDisposalMethods() As List(Of String)
#End Region

End Interface


